package com.huahan.product.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 商品信息表 new
 * @TableName t_products_info
 */
@TableName(value ="t_products_info")
@Data
public class ProductsInfo implements Serializable {
    /**
     * 商品ID
     */
    @TableId(type = IdType.AUTO)
    private Integer goodsId;

    /**
     * 店铺ID
     */
    private Integer shopId;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 原价
     */
    private BigDecimal originalPrice;

    /**
     * 现价
     */
    private BigDecimal currentPrice;

    /**
     * 商品货号
     */
    private String goodsArticleNumber;

    /**
     * 商品编号
     */
    private String goodsNuber;

    /**
     * 一级分类ID
     */
    private Integer oneClassifyId;

    /**
     * 二级分类ID
     */
    private Integer twoClassifyId;

    /**
     * 三级分类ID
     */
    private Integer threeClassifyId;

    /**
     * 销量
     */
    private Integer salesNumber;

    /**
     * 添加时间
     */
    private Long createTime;

    /**
     * 更新时间
     */
    private Long updateTime;

    /**
     * 主图
     */
    private String image;

    /**
     * 品牌ID
     */
    private String brandId;

    /**
     * 预下架时间
     */
    private Long outTime;

    /**
     * 商品状态【0:新增；1：审核中；2:审核未通过；3:已上架；4:已下架；5:作废】
     */
    private Integer goodsState;

    /**
     * 库存【三方商品不限库存】
     */
    private Integer inventory;

    /**
     * 上架时间
     */
    private Long upTime;

    /**
     * 下架时间
     */
    private Long downTime;

    /**
     * 专区id 多个
     */
    private String zoneId;

    /**
     * 专区名称
     */
    private String zoneName;

    /**
     * 0 :未推送,其他为移动端商品id
     */
    private Integer isPuchApp;

    /**
     * 是否删除[0否  1是]
     */
    private Integer isDel;

    /**
     * 是否为套餐商品【0:否，1：是】
     */
    private Integer isPackage;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProductsInfo other = (ProductsInfo) that;
        return (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
            && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
            && (this.getOriginalPrice() == null ? other.getOriginalPrice() == null : this.getOriginalPrice().equals(other.getOriginalPrice()))
            && (this.getCurrentPrice() == null ? other.getCurrentPrice() == null : this.getCurrentPrice().equals(other.getCurrentPrice()))
            && (this.getGoodsArticleNumber() == null ? other.getGoodsArticleNumber() == null : this.getGoodsArticleNumber().equals(other.getGoodsArticleNumber()))
            && (this.getGoodsNuber() == null ? other.getGoodsNuber() == null : this.getGoodsNuber().equals(other.getGoodsNuber()))
            && (this.getOneClassifyId() == null ? other.getOneClassifyId() == null : this.getOneClassifyId().equals(other.getOneClassifyId()))
            && (this.getTwoClassifyId() == null ? other.getTwoClassifyId() == null : this.getTwoClassifyId().equals(other.getTwoClassifyId()))
            && (this.getThreeClassifyId() == null ? other.getThreeClassifyId() == null : this.getThreeClassifyId().equals(other.getThreeClassifyId()))
            && (this.getSalesNumber() == null ? other.getSalesNumber() == null : this.getSalesNumber().equals(other.getSalesNumber()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()))
            && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
            && (this.getOutTime() == null ? other.getOutTime() == null : this.getOutTime().equals(other.getOutTime()))
            && (this.getGoodsState() == null ? other.getGoodsState() == null : this.getGoodsState().equals(other.getGoodsState()))
            && (this.getInventory() == null ? other.getInventory() == null : this.getInventory().equals(other.getInventory()))
            && (this.getUpTime() == null ? other.getUpTime() == null : this.getUpTime().equals(other.getUpTime()))
            && (this.getDownTime() == null ? other.getDownTime() == null : this.getDownTime().equals(other.getDownTime()))
            && (this.getZoneId() == null ? other.getZoneId() == null : this.getZoneId().equals(other.getZoneId()))
            && (this.getZoneName() == null ? other.getZoneName() == null : this.getZoneName().equals(other.getZoneName()))
            && (this.getIsPuchApp() == null ? other.getIsPuchApp() == null : this.getIsPuchApp().equals(other.getIsPuchApp()))
            && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel()))
            && (this.getIsPackage() == null ? other.getIsPackage() == null : this.getIsPackage().equals(other.getIsPackage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getOriginalPrice() == null) ? 0 : getOriginalPrice().hashCode());
        result = prime * result + ((getCurrentPrice() == null) ? 0 : getCurrentPrice().hashCode());
        result = prime * result + ((getGoodsArticleNumber() == null) ? 0 : getGoodsArticleNumber().hashCode());
        result = prime * result + ((getGoodsNuber() == null) ? 0 : getGoodsNuber().hashCode());
        result = prime * result + ((getOneClassifyId() == null) ? 0 : getOneClassifyId().hashCode());
        result = prime * result + ((getTwoClassifyId() == null) ? 0 : getTwoClassifyId().hashCode());
        result = prime * result + ((getThreeClassifyId() == null) ? 0 : getThreeClassifyId().hashCode());
        result = prime * result + ((getSalesNumber() == null) ? 0 : getSalesNumber().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
        result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
        result = prime * result + ((getOutTime() == null) ? 0 : getOutTime().hashCode());
        result = prime * result + ((getGoodsState() == null) ? 0 : getGoodsState().hashCode());
        result = prime * result + ((getInventory() == null) ? 0 : getInventory().hashCode());
        result = prime * result + ((getUpTime() == null) ? 0 : getUpTime().hashCode());
        result = prime * result + ((getDownTime() == null) ? 0 : getDownTime().hashCode());
        result = prime * result + ((getZoneId() == null) ? 0 : getZoneId().hashCode());
        result = prime * result + ((getZoneName() == null) ? 0 : getZoneName().hashCode());
        result = prime * result + ((getIsPuchApp() == null) ? 0 : getIsPuchApp().hashCode());
        result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode());
        result = prime * result + ((getIsPackage() == null) ? 0 : getIsPackage().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", goodsId=").append(goodsId);
        sb.append(", shopId=").append(shopId);
        sb.append(", goodsName=").append(goodsName);
        sb.append(", originalPrice=").append(originalPrice);
        sb.append(", currentPrice=").append(currentPrice);
        sb.append(", goodsArticleNumber=").append(goodsArticleNumber);
        sb.append(", goodsNuber=").append(goodsNuber);
        sb.append(", oneClassifyId=").append(oneClassifyId);
        sb.append(", twoClassifyId=").append(twoClassifyId);
        sb.append(", threeClassifyId=").append(threeClassifyId);
        sb.append(", salesNumber=").append(salesNumber);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", image=").append(image);
        sb.append(", brandId=").append(brandId);
        sb.append(", outTime=").append(outTime);
        sb.append(", goodsState=").append(goodsState);
        sb.append(", inventory=").append(inventory);
        sb.append(", upTime=").append(upTime);
        sb.append(", downTime=").append(downTime);
        sb.append(", zoneId=").append(zoneId);
        sb.append(", zoneName=").append(zoneName);
        sb.append(", isPuchApp=").append(isPuchApp);
        sb.append(", isDel=").append(isDel);
        sb.append(", isPackage=").append(isPackage);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}